package model;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.util.List;

/**
 * 
 * @author Charlie Hatcher
 * 
 */
public class StraightLinePen extends LinePen {

	public StraightLinePen(Model model) {
		super(model);

	}

	@Override
	/**
	 * Sends the necessary information to the thread to draw the movement of the turtles line
	 */
	public void drawLineMovement(Pixmap pixmap, int speed, Point starting,
			int dx, int dy) {
	    if (MyPenLevel == false) return;
	    Graphics2D graphic = pixmap.getBackgroundImage().createGraphics();
	    BasicStroke stroke = new BasicStroke(getThickness());
	    graphic.setStroke(stroke);
	    graphic.setPaint(getColor());
        graphic.drawLine((int) (starting.x), (int) (starting.y),
                         (int) (starting.x+dx), (int) (starting.y + dy));
//		ThreadClass tc = new ThreadClass(pixmap, speed, starting, dx, dy,
//				getColor(), stroke, getModel());
//		(new Thread(tc)).start();

	}
}
